<?php
namespace Auth\Controller;
 
use Zend\Mvc\Controller\AbstractActionController;
use Zend\Authentication\AuthenticationService;
use Zend\View\Model\ViewModel;
use Zend\Session\Container;
 
class SuccessController extends AbstractActionController
{   
	
    public function indexAction()
    {
		
		$sessionUser = new Container('user');
		if($sessionUser->username){
			return new ViewModel(array(
			   	'userinfo' => $sessionUser->username,
			 ));
		}
		else{
			return $this->redirect()->toRoute('auth');
		}
		
    }
}